package com.wgz.medicalmanagement.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import com.wgz.medicalmanagement.domain.entity.MedicalRecord;

@Repository
public interface MedicalRecordRepository extends JpaRepository<MedicalRecord, Long> {
    
    /**
     * 根据患者ID查询就诊记录（分页）
     * @param patientId 患者ID
     * @param pageable 分页参数
     * @return 就诊记录分页结果
     */
    Page<MedicalRecord> findByPatientIdAndDeletedOrderByVisitDateDesc(Long patientId, Integer deleted, Pageable pageable);
} 